package cn.wolfcode.wolf2w.business.service;

import cn.wolfcode.wolf2w.business.api.domain.DestinationEs;
import cn.wolfcode.wolf2w.business.api.domain.NoteEs;
import cn.wolfcode.wolf2w.business.api.domain.StrategyEs;
import cn.wolfcode.wolf2w.business.api.domain.UserinfoEs;
import cn.wolfcode.wolf2w.business.query.SearchQuery;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.data.domain.Page;

import java.lang.reflect.InvocationTargetException;

public interface ISearchService {
    void saveStrategy(StrategyEs strategyEs);

    //高亮查询通用接口，可以查询攻略、游记、问答、找人
    //T表示查询数据库实体类
    //clazz mysql数据库存储的class类型
    //esClazz ES库存储的class类型
    //qo查询条件

    <T> Page<T> searchWithHighLight(Class<T> clazz, Class<?> esClazz, SearchQuery  query,String... fields) throws InvocationTargetException, IllegalAccessException;

    void saveUserInfo(UserinfoEs userinfoEs);

    void saveNote(NoteEs noteEs);

    void saveDestination(DestinationEs destinationEs);
}
